//
// Maths.hpp for  in /home/goldbe_y//tek3/Projets/Maths/302graphe
// 
// Made by yoni goldberg
// Login   <goldbe_y@epitech.net>
// 
// Started on  Mon Sep 24 14:38:25 2012 yoni goldberg
// Last update Wed Sep 26 19:50:19 2012 yoni goldberg
//

#ifndef MATHS
#define MATHS

#include "Parse.hpp"
#include <cstdlib>

class Maths
{
public:
  Maths(const std::string &);
  ~Maths();
  
  int				get_line();
  int				get_sommets();
  int				**get_second_matrix();
  int				**get_first_matrix();
  int				**get_third_matrix();
  int				**get_forth_matrix();
  std::vector<std::string>	get_tab();

  void				aff_tab(std::vector<std::string>);
  void				aff_matrix(int **);

private:
  std::string			_str;
  std::vector<std::string>	_tab;
  int				_line;
  int				_sommets;

  int				**_matrix;
  int				**_mat2;
  int				**_mat3;
  int				**_mat4;

  int	min(int , int);
  int	calc(int,int);
  void	delete_matrix(int **);
  void	init_matrix(int ***);
  void	init_diag(int ***, int);
  void	nombre_sommet();
  void	check(char);
  void	mult_matrix();
};

#endif
